package com.project.erp.action.contract.trade;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ModelDriven;
import com.project.erp.action.BaseAction;
import com.project.erp.common.Constants;
import com.project.erp.common.utils.DateUtils;
import com.project.erp.common.utils.ExcelUtils;
import com.project.erp.common.utils.Page;
import com.project.erp.common.utils.SerialNumberUtils;
import com.project.erp.model.contract.trade.TradeCusContract;
import com.project.erp.model.contract.trade.TradeCusContractDtl;
import com.project.erp.model.crm.company.Company;
import com.project.erp.model.fobcost.FobCost;
import com.project.erp.model.system.DocNumber;
import com.project.erp.service.contract.trade.TradeCusContractDtlService;
import com.project.erp.service.contract.trade.TradeCusContractService;
import com.project.erp.service.crm.company.CompanyService;
/**
 * 
 * COPYRIGHT (C) 2013 BY XXX公司

 *  功能模块名：合同-外贸客户合同

 *  功能描述：分发处理外贸客户合同请求

 * @author LiJiaGuo    

 * @version 1.0  

 * @created 2013-12-14 下午12:06:46
 */
@Controller
@Scope("prototype")
public class TradeCusContractAction extends BaseAction implements
		ModelDriven<TradeCusContract> {

	private static final long serialVersionUID = 8019224397663019125L;
	
	private TradeCusContract tradeCusContract;
	private FobCost fobCost;
	private TradeCusContractDtl tradeCusContractDtl;
	private String tradeCusContractIds;
	private List<FobCost> fobCostList;
	private List<TradeCusContractDtl> tradeCusContractDtlList;
	private List<TradeCusContract> tradeCusContractList;
	
	private Company company;
	
	//细表fobcostid
	private Long[] fobcostIds;
	//客户合同细表字段
	private String[] tradeCusContractDtlIds2;
	private String[] item;	//项目(条目)
	private String[] itemSize;	//项目(条目)规格

	//接收*,*,*,*,*形式的字符串
	private String[] totalContStr;	//柜数
	private String[] boxOfContStr;	//每柜盒数
	private String[] totalBoxsStr;	//总盒数
	private String[] pcsOfBoxStr;	//每盒箱数
	private String[] totalPcsStr;	//总箱数
	private String[] mtwoOfContStr; //每柜平方数
	private String[] totalMtwoStr;	//总平方数
	private String[] fobUnitPriceStr;	//(平方米)单价
	private String[] amountStr;	//每条记录总价
	
	private String tradeCusContractDtlIdsStr;
	private String itemDtl;	//项目(条目)
	private String itemSizeDtl;	//项目(条目)规格
	private String totalContDtl;	//柜数
	private String boxOfContDtl;	//每柜盒数
	private String totalBoxsDtl;	//总盒数
	private String pcsOfBoxDtl;	//每盒箱数
	private String totalPcsDtl;	//总箱数
	private String mtwoOfContDtl; //每柜平方数
	private String totalMtwoDtl;	//总平方数
	private String fobUnitPriceDtl;	//(平方米)单价
	private String amountDtl;	//每条记录总价
	
	@Autowired
	private TradeCusContractService tradeCusContractService;
	@Autowired
	private TradeCusContractDtlService tradeCusContractDtlService;
	@Autowired
	private CompanyService companyService;
	
	/**
	 * 取得记录列表
	 * @return
	 * @throws Exception
	 */
	public String getTradeCusContractListData() throws Exception{
		logger.debug("entry getTradeCusContractListData method ...");
		try{
			Page<TradeCusContract> page = new Page<TradeCusContract>();
			page.setPageNo(getPage());
			page.setPageSize(getRows());
			page.setOrderBy("createTime");
			page.setOrder(Page.DESC);
			page = tradeCusContractService.getTradeCusContractPageBySearch(page, tradeCusContract);

			//设置表格返回数据
			this.getResultMap().put("total", page.getTotalCount());
			this.getResultMap().put("rows", page.getResult());
		}catch(Exception e){
			logger.error("execute getTradeCusContractListData error!", e);
		}
		return SUCCESS;
	}
	
	/**
	 * 到添加外贸客户合同模板信息
	 * @return SUCCESS
	 * @throws Exception 异常处理
	 */
	public String toAddTradeCusContract() throws Exception{
		logger.debug("entry toAddTradeCusContract method!...");
		company = companyService.getDefaultCompany();

		//设置具体生成编号参数
		DocNumber docNumber = new DocNumber();
		docNumber.setDocName(this.getParamByKeys(Constants.SERIALNUM_PREFIX, Constants.CUSCONTRACT_SERIALNUM_PREFIX));
		docNumber.setGeneYear(DateUtils.getYearStr());
		String invoino = SerialNumberUtils.getSerialNumber(docNumber, DateUtils.getYearLastTwoStr(), 3);
		tradeCusContract.setInvoiceNo(invoino);//发票号
		tradeCusContract.setInvoiceDate(SerialNumberUtils.getInvoiceDate());//发票日期
		return SUCCESS;
	}
	
	/**
	 * 保存外贸客户合同信息
	 * @return SUCCESS
	 * @throws Exception 异常信息
	 */
	public String addTradeCusContract() throws Exception{
		logger.debug("entry addTradeCusContract method!...");
		try{
			//保存关联的fob成本
			//fobCostList = new ArrayList<FobCost>();
			//if(fobcostIds != null){
				//设置细表信息
				//for(int i=0;i<fobcostIds.length;i++){
					//fobCost = new FobCost();
					//fobCost.setId(fobcostIds[i]);
					//fobCostList.add(fobCost);
				//}
				//tradeCusContract.setFobCostList(fobCostList);
			//}
			
			//保存细表内容
			tradeCusContractDtlList = new ArrayList<TradeCusContractDtl>();
			
			//将细表字段转成数组格式
			if(!StringUtils.isBlank(itemDtl)){
				item = itemDtl.split(",");
			}
			if(!StringUtils.isBlank(itemSizeDtl)){
				itemSize = itemSizeDtl.split(",");
			}
			if(!StringUtils.isBlank(totalContDtl)){
				totalContStr = totalContDtl.split(",");
			}
			if(!StringUtils.isBlank(boxOfContDtl)){
				boxOfContStr = boxOfContDtl.split(",");
			}
			if(!StringUtils.isBlank(totalBoxsDtl)){
				totalBoxsStr = totalBoxsDtl.split(",");
			}
			if(!StringUtils.isBlank(pcsOfBoxDtl)){
				pcsOfBoxStr = pcsOfBoxDtl.split(",");
			}
			if(!StringUtils.isBlank(totalPcsDtl)){
				totalPcsStr = totalPcsDtl.split(",");
			}
			if(!StringUtils.isBlank(mtwoOfContDtl)){
				mtwoOfContStr = mtwoOfContDtl.split(",");
			}
			if(!StringUtils.isBlank(totalMtwoDtl)){
				totalMtwoStr = totalMtwoDtl.split(",");
			}
			if(!StringUtils.isBlank(fobUnitPriceDtl)){
				fobUnitPriceStr = fobUnitPriceDtl.split(",");
			}
			if(!StringUtils.isBlank(amountDtl)){
				amountStr = amountDtl.split(",");
			}
			
			if(itemDtl != null){
				//设置细表信息
				for(int i=0;i<item.length;i++){
					tradeCusContractDtl = new TradeCusContractDtl();
					tradeCusContractDtl.setTradeCusContract(tradeCusContract);
					tradeCusContractDtl.setItem(item[i]);
					tradeCusContractDtl.setItemSize(itemSize[i]);
					tradeCusContractDtl.setTotalCont(Double.parseDouble(totalContStr[i]));
					tradeCusContractDtl.setBoxOfCont(Double.parseDouble(boxOfContStr[i]));
					tradeCusContractDtl.setTotalBoxs(Double.parseDouble(totalBoxsStr[i]));
					tradeCusContractDtl.setPcsOfBox(Double.parseDouble(pcsOfBoxStr[i]));
					tradeCusContractDtl.setTotalPcs(Double.parseDouble(totalPcsStr[i]));
					tradeCusContractDtl.setMtwoOfCont(Double.parseDouble(mtwoOfContStr[i]));
					tradeCusContractDtl.setTotalMtwo(Double.parseDouble(totalMtwoStr[i]));
					tradeCusContractDtl.setFobUnitPrice(Double.parseDouble(fobUnitPriceStr[i]));
					tradeCusContractDtl.setAmount(Double.parseDouble(amountStr[i]));
					
					tradeCusContractDtlList.add(tradeCusContractDtl);
				}
				tradeCusContract.setTradeCusContractDtlList(tradeCusContractDtlList);
			}
			
			//保存主表信息
			tradeCusContractService.saveTradeCusContract(tradeCusContract);
			
			//返回成功信息
			this.getResultMap().put("result", SUCCESS);
			String msgStr = this.getText("erp.opt.success.tip", new String[]{this.getText("erp.add"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}catch(Exception e){
			//返回错误信息
			logger.error("添加外贸客户合同信息失败,失败原因:" + e.getMessage(),e);
			this.getResultMap().put("result",ERROR);
			String msgStr = this.getText("erp.opt.fail.tip", new String[]{this.getText("erp.add"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}
		return SUCCESS;
	}
	
	/**
	 * 到修改外贸客户合同页面
	 * @return SUCCESS
	 * @throws Exception 异常处理
	 */
	public String toEditTradeCusContract() throws Exception{
		logger.debug("entry toEditTradeCusContract method!...");
		try{
			logger.info("********************tradeCusContractid="+tradeCusContract.getId());
			Long tradeCusContractId = tradeCusContract.getId();
			tradeCusContract = tradeCusContractService.getTradeCusContractById(tradeCusContractId);
		}catch(Exception e){
			e.printStackTrace();
			logger.error("execute toEditTradeCusContract page error!", e);
		}
		return SUCCESS;
	}
	
	/**
	 * 到查看外贸客户合同页面
	 * @return SUCCESS
	 * @throws Exception 异常处理
	 */
	public String toViewTradeCusContract() throws Exception{
		logger.debug("entry toViewTradeCusContract method!...");
		try{
			logger.info("********************tradeCusContractid="+tradeCusContract.getId());
			Long tradeCusContractId = tradeCusContract.getId();
			tradeCusContract = tradeCusContractService.getTradeCusContractById(tradeCusContractId);
		}catch(Exception e){
			e.printStackTrace();
			logger.error("execute toViewTradeCusContract page error!", e);
		}
		return SUCCESS;
	}
	
	/**
	 * 修改外贸客户合同信息
	 * @return
	 * @throws Exception
	 */
	public String editTradeCusContract() throws Exception{
		logger.debug("entry editTradeCusContract method!...");
		try{
			logger.info("tradeCusContract="+tradeCusContract);
			TradeCusContract persistentTradeCusContract = tradeCusContractService.getTradeCusContractById(tradeCusContract.getId());
			
			fobCostList = new ArrayList<FobCost>();
			tradeCusContractDtlList = new ArrayList<TradeCusContractDtl>();
			List<TradeCusContractDtl> delTradeCusContractDtlList = persistentTradeCusContract.getTradeCusContractDtlList();
			
			//将细表字段转成数组格式
			if(!StringUtils.isBlank(itemDtl)){
				item = itemDtl.split(",");
			}
			if(!StringUtils.isBlank(itemSizeDtl)){
				itemSize = itemSizeDtl.split(",");
			}
			if(!StringUtils.isBlank(totalContDtl)){
				totalContStr = totalContDtl.split(",");
			}
			if(!StringUtils.isBlank(boxOfContDtl)){
				boxOfContStr = boxOfContDtl.split(",");
			}
			if(!StringUtils.isBlank(totalBoxsDtl)){
				totalBoxsStr = totalBoxsDtl.split(",");
			}
			if(!StringUtils.isBlank(pcsOfBoxDtl)){
				pcsOfBoxStr = pcsOfBoxDtl.split(",");
			}
			if(!StringUtils.isBlank(totalPcsDtl)){
				totalPcsStr = totalPcsDtl.split(",");
			}
			if(!StringUtils.isBlank(mtwoOfContDtl)){
				mtwoOfContStr = mtwoOfContDtl.split(",");
			}
			if(!StringUtils.isBlank(totalMtwoDtl)){
				totalMtwoStr = totalMtwoDtl.split(",");
			}
			if(!StringUtils.isBlank(fobUnitPriceDtl)){
				fobUnitPriceStr = fobUnitPriceDtl.split(",");
			}
			if(!StringUtils.isBlank(amountDtl)){
				amountStr = amountDtl.split(",");
			}
			if(!StringUtils.isBlank(tradeCusContractDtlIdsStr)){
				tradeCusContractDtlIds2 = tradeCusContractDtlIdsStr.split(",");
			}

			if(itemDtl != null){
				if(item != null){//针对没有细表记录的情况
					//设置细表信息
					for(int i=0;i<item.length;i++){
						//新增的记录
						if((tradeCusContractDtlIds2[i] == null) || ("".equals(tradeCusContractDtlIds2[i].trim()))){
							tradeCusContractDtl = new TradeCusContractDtl();
							tradeCusContractDtl.setItem(item[i]);
							tradeCusContractDtl.setItemSize(itemSize[i]);
							tradeCusContractDtl.setTotalCont(Double.parseDouble(totalContStr[i]));
							tradeCusContractDtl.setBoxOfCont(Double.parseDouble(boxOfContStr[i]));
							tradeCusContractDtl.setTotalBoxs(Double.parseDouble(totalBoxsStr[i]));
							tradeCusContractDtl.setPcsOfBox(Double.parseDouble(pcsOfBoxStr[i]));
							tradeCusContractDtl.setTotalPcs(Double.parseDouble(totalPcsStr[i]));
							tradeCusContractDtl.setMtwoOfCont(Double.parseDouble(mtwoOfContStr[i]));
							tradeCusContractDtl.setTotalMtwo(Double.parseDouble(totalMtwoStr[i]));
							tradeCusContractDtl.setFobUnitPrice(Double.parseDouble(fobUnitPriceStr[i]));
							tradeCusContractDtl.setAmount(Double.parseDouble(amountStr[i]));
							tradeCusContractDtl.setTradeCusContract(persistentTradeCusContract);
							tradeCusContractDtlList.add(tradeCusContractDtl);
							
							//保存关联的fob成本
							//fobCost = new FobCost();
							//fobCost.setId(fobcostIds[i]);
							//fobCostList.add(fobCost);
						}else{//修改的记录
							TradeCusContractDtl persistentTradeCusContractDtl = tradeCusContractDtlService.getTradeCusContractDtlById(Long.parseLong(tradeCusContractDtlIds2[i].trim()));
	
							persistentTradeCusContractDtl.setItem(item[i]);
							persistentTradeCusContractDtl.setItemSize(itemSize[i]);
							persistentTradeCusContractDtl.setTotalCont(Double.parseDouble(totalContStr[i]));
							persistentTradeCusContractDtl.setBoxOfCont(Double.parseDouble(boxOfContStr[i]));
							persistentTradeCusContractDtl.setTotalBoxs(Double.parseDouble(totalBoxsStr[i]));
							persistentTradeCusContractDtl.setPcsOfBox(Double.parseDouble(pcsOfBoxStr[i]));
							persistentTradeCusContractDtl.setTotalPcs(Double.parseDouble(totalPcsStr[i]));
							persistentTradeCusContractDtl.setMtwoOfCont(Double.parseDouble(mtwoOfContStr[i]));
							persistentTradeCusContractDtl.setTotalMtwo(Double.parseDouble(totalMtwoStr[i]));
							persistentTradeCusContractDtl.setFobUnitPrice(Double.parseDouble(fobUnitPriceStr[i]));
							persistentTradeCusContractDtl.setAmount(Double.parseDouble(amountStr[i]));
							persistentTradeCusContractDtl.setTradeCusContract(persistentTradeCusContract);
	
							tradeCusContractDtlList.add(persistentTradeCusContractDtl);
							
							//保存关联的fob成本
							//fobCost = new FobCost();
							//fobCost.setId(fobcostIds[i]);
							//fobCostList.add(fobCost);
						}
					}
					tradeCusContract.setTradeCusContractDtlList(tradeCusContractDtlList);
				}else{
					tradeCusContract.setTradeCusContractDtlList(null);
				}
			}
			//注:创建日期在这拷贝为空覆盖以前的,所有不拷贝创建日期
			BeanUtils.copyProperties(tradeCusContract, persistentTradeCusContract, new String[]{"createUser","createTime"});
			//修改信息
			tradeCusContractService.editTradeCusContract(persistentTradeCusContract,delTradeCusContractDtlList,tradeCusContractDtlIds2);
			//返回成功信息
			this.getResultMap().put("result", SUCCESS);
			String msgStr = this.getText("erp.opt.success.tip", new String[]{this.getText("erp.edit"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}catch(Exception e){
			//返回错误信息
			logger.error("修改FOB成本模板信息失败,失败原因:" + e.getMessage(),e);
			this.getResultMap().put("result",ERROR);
			String msgStr = this.getText("erp.opt.fail.tip", new String[]{this.getText("erp.edit"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}
		return SUCCESS;
	}
	
	/**
	 * 删除外贸客户合同
	 * @return
	 * @throws Exception
	 */
	public String delTradeCusContract() throws Exception{
		logger.debug("entry delTradeCusContract method!...");
		try{
			logger.info("tradeCusContractIds="+tradeCusContractIds);
			String[] arrayIds = tradeCusContractIds.split(",");
			tradeCusContractService.delTradeCusContract(arrayIds);
			//返回成功信息
			this.getResultMap().put("result", SUCCESS);
			String msgStr = this.getText("erp.opt.success.tip", new String[]{this.getText("erp.erp.delete"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}catch(Exception e){
			logger.error("删除外贸客户合同信息失败,失败原因:" + e.getMessage(),e);
			//返回错误信息
			e.printStackTrace();
			this.getResultMap().put("result",ERROR);
			String msgStr = this.getText("erp.opt.fail.tip", new String[]{this.getText("erp.erp.delete"),this.getText("erp.business.contract.trade.businame")});
			this.getResultMap().put("msg",msgStr);
		}
		return SUCCESS;
	}
	
	/**
	 * 导出excel方法
	 * @return SUCCESS
	 * @throws Exception 异常处理
	 */
	public InputStream getExcelTradeCusContract() throws Exception{
		logger.debug("entry excelTradeCusContract method!...");
		List<String> items = new ArrayList<String>();
		List<List<String>> datas = new ArrayList<List<String>>();
		try{
			logger.info("********************tradeCusContractid="+tradeCusContract.getId());
			Long tradeCusContractId = tradeCusContract.getId();
			tradeCusContract = tradeCusContractService.getTradeCusContractById(tradeCusContractId);
			List<TradeCusContractDtl> contractDtlList = tradeCusContract.getTradeCusContractDtlList();
			/**
			items.add("GRANITE PRODUCTS");
			items.add("SIZE/CM");
			items.add("TOTAL CONT");
			items.add("BOX CONT");
			items.add("TOTAL BOX");
			items.add("PCS BOX");
			items.add("TOTAL PCS");
			items.add("M2 CONT");
			items.add("TOTAL M2");
			items.add("UNIT PRICE FOB CHINA");
			
			for(TradeCusContractDtl conDtl:contractDtlList){
				List<String> data = new ArrayList<String>();
				data.add(conDtl.getItem());
				data.add(conDtl.getItemSize());
				data.add(String.valueOf(conDtl.getTotalCont()));
				data.add(String.valueOf(conDtl.getBoxOfCont()));
				data.add(String.valueOf(conDtl.getTotalBoxs()));
				data.add(String.valueOf(conDtl.getPcsOfBox()));
				data.add(String.valueOf(conDtl.getTotalPcs()));
				data.add(String.valueOf(conDtl.getMtwoOfCont()));
				data.add(String.valueOf(conDtl.getTotalMtwo()));
				data.add(String.valueOf(conDtl.getFobUnitPrice()));
				datas.add(data);
			}
			*/
		}catch(Exception e){
			e.printStackTrace();
			logger.error("execute excelTradeCusContract page error!", e);
		}
		//ExcelUtils excelUtils = new ExcelUtils(items,datas);
		TradeCusContractExcel tradeCusContractExcel = new TradeCusContractExcel(tradeCusContract, this.getText("erp.business.contract.trade.commerinvoice"), this.getText("erp.business.contract.trade.to"));
		return tradeCusContractExcel.getExcelOutputStream();
	}
	
	@Override
	public TradeCusContract getModel() {
		if(tradeCusContract == null){
			tradeCusContract = new TradeCusContract();
		}
		return tradeCusContract;
	}

	public TradeCusContract getTradeCusContract() {
		return tradeCusContract;
	}

	public void setTradeCusContract(TradeCusContract tradeCusContract) {
		this.tradeCusContract = tradeCusContract;
	}

	public List<FobCost> getFobCostList() {
		return fobCostList;
	}

	public void setFobCostList(List<FobCost> fobCostList) {
		this.fobCostList = fobCostList;
	}

	public List<TradeCusContract> getTradeCusContractList() {
		return tradeCusContractList;
	}

	public void setTradeCusContractList(List<TradeCusContract> tradeCusContractList) {
		this.tradeCusContractList = tradeCusContractList;
	}

	public List<TradeCusContractDtl> getTradeCusContractDtlList() {
		return tradeCusContractDtlList;
	}

	public void setTradeCusContractDtlList(
			List<TradeCusContractDtl> tradeCusContractDtlList) {
		this.tradeCusContractDtlList = tradeCusContractDtlList;
	}

	public Long[] getFobcostIds() {
		return fobcostIds;
	}

	public void setFobcostIds(Long[] fobcostIds) {
		this.fobcostIds = fobcostIds;
	}

	public String getTradeCusContractIds() {
		return tradeCusContractIds;
	}

	public void setTradeCusContractIds(String tradeCusContractIds) {
		this.tradeCusContractIds = tradeCusContractIds;
	}

	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	public String getItemDtl() {
		return itemDtl;
	}

	public void setItemDtl(String itemDtl) {
		this.itemDtl = itemDtl;
	}

	public String getItemSizeDtl() {
		return itemSizeDtl;
	}

	public void setItemSizeDtl(String itemSizeDtl) {
		this.itemSizeDtl = itemSizeDtl;
	}

	public String getTotalContDtl() {
		return totalContDtl;
	}

	public void setTotalContDtl(String totalContDtl) {
		this.totalContDtl = totalContDtl;
	}

	public String getBoxOfContDtl() {
		return boxOfContDtl;
	}

	public void setBoxOfContDtl(String boxOfContDtl) {
		this.boxOfContDtl = boxOfContDtl;
	}

	public String getTotalBoxsDtl() {
		return totalBoxsDtl;
	}

	public void setTotalBoxsDtl(String totalBoxsDtl) {
		this.totalBoxsDtl = totalBoxsDtl;
	}

	public String getPcsOfBoxDtl() {
		return pcsOfBoxDtl;
	}

	public void setPcsOfBoxDtl(String pcsOfBoxDtl) {
		this.pcsOfBoxDtl = pcsOfBoxDtl;
	}

	public String getTotalPcsDtl() {
		return totalPcsDtl;
	}

	public void setTotalPcsDtl(String totalPcsDtl) {
		this.totalPcsDtl = totalPcsDtl;
	}

	public String getMtwoOfContDtl() {
		return mtwoOfContDtl;
	}

	public void setMtwoOfContDtl(String mtwoOfContDtl) {
		this.mtwoOfContDtl = mtwoOfContDtl;
	}

	public String getTotalMtwoDtl() {
		return totalMtwoDtl;
	}

	public void setTotalMtwoDtl(String totalMtwoDtl) {
		this.totalMtwoDtl = totalMtwoDtl;
	}

	public String getFobUnitPriceDtl() {
		return fobUnitPriceDtl;
	}

	public void setFobUnitPriceDtl(String fobUnitPriceDtl) {
		this.fobUnitPriceDtl = fobUnitPriceDtl;
	}

	public String getAmountDtl() {
		return amountDtl;
	}

	public void setAmountDtl(String amountDtl) {
		this.amountDtl = amountDtl;
	}

	public String getTradeCusContractDtlIdsStr() {
		return tradeCusContractDtlIdsStr;
	}

	public void setTradeCusContractDtlIdsStr(String tradeCusContractDtlIdsStr) {
		this.tradeCusContractDtlIdsStr = tradeCusContractDtlIdsStr;
	}
}
